package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * DvErrorPerdon generated by hbm2java
 */
@Entity
@Table(name = "DV_ERROR_PERDON", schema = "DEVOLUCIONES")
public class DvErrorPerdon implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1739520618276041297L;
	private DvErrorPerdonId id;
	private DvPerFiscal dvPerFiscal;
	private String cusuario;
	private Date fhingreso;

	public DvErrorPerdon() {
	}

	public DvErrorPerdon(DvErrorPerdonId id, DvPerFiscal dvPerFiscal) {
		this.id = id;
		this.dvPerFiscal = dvPerFiscal;
	}

	public DvErrorPerdon(DvErrorPerdonId id, DvPerFiscal dvPerFiscal,
			String cusuario, Date fhingreso) {
		this.id = id;
		this.dvPerFiscal = dvPerFiscal;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "cregla", column = @Column(name = "C_REGLA", nullable = false, length = 25)),
			@AttributeOverride(name = "fafiscal", column = @Column(name = "FA_FISCAL", nullable = false, length = 4)),
			@AttributeOverride(name = "cmodelo", column = @Column(name = "C_MODELO", nullable = false, length = 3)),
			@AttributeOverride(name = "nversion", column = @Column(name = "N_VERSION", nullable = false, precision = 4, scale = 0)) })
	public DvErrorPerdonId getId() {
		return this.id;
	}

	public void setId(DvErrorPerdonId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "FA_FISCAL", nullable = false, insertable = false, updatable = false)
	public DvPerFiscal getDvPerFiscal() {
		return this.dvPerFiscal;
	}

	public void setDvPerFiscal(DvPerFiscal dvPerFiscal) {
		this.dvPerFiscal = dvPerFiscal;
	}

	@Column(name = "C_USUARIO", length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

}
